package com.scienview.test;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


import com.scienview.core.anotation.Access;
import com.scienview.core.enums.Level;

public class PermissionHelper {

	public static  Map<Level, List<Permission>> map=new HashMap<Level, List<Permission>>();
	
	public static void parseMethod(String classMapping,Method method){
	
		Access access=method.getAnnotation(Access.class);
		Permission permission=new Permission().padding(method);
		if(!map.containsKey(access.level())){
			map.put(access.level(), new ArrayList<Permission>());
		}
		map.get(access.level()).add(permission);
	}
}
